Conventionally, techniques of determining whether knocking is present or absent in an combustion engine are known. For example, there is a technique of determining whether knocking is present or absent based on whether or not magnitude of vibration detected in an internal combustion engine is greater than a knocking determination value. The magnitude of vibration detected by the technique includes mechanical vibration of the internal combustion engine itself. The mechanical vibration of the internal combustion engine itself varies by the speed of the internal combustion engine. Accordingly, in order to improve the precision of knocking determination, it is necessary to carry out knocking determination taking into account of the mechanical vibration of the internal engine itself which varies by the speed of the internal combustion engine.
Japanese Patent Laying-Open No. 8-4580 discloses a knocking determining device for an internal combustion engine that can determine knocking without impairing the capability of following the variation of the engine speed. The knocking determining device for an internal combustion engine disclosed in Japanese Patent Laying-Open No. 8-4580 includes: a knock sensor detecting vibration of an internal combustion engine and converting it into an electric signal level; a magnitude correcting device correcting magnitude of the electric signal from the knock sensor with an engine speed; a background level setting device calculating a weighted average of magnitude correction values corrected by the magnitude correcting device and updating and setting the weighted average value as a background level; and a knocking determining device determining whether there is knocking in the internal combustion engine in accordance with the magnitude correction value corrected by the magnitude correcting device and the background level set by the background level setting device.
According to the knocking determining device for an internal combustion engine disclosed in the publication, in consideration of the amplitude of vibration of the engine being proportional to an engine speed, the background level that is to be the standard for determining knocking and a magnitude signal from the knock sensor are corrected with an engine speed. That is, by setting the background level to be the standard for determination as a value that is not susceptible to the level variation due to an engine speed, knocking determination that can address any speed of the engine can be carried out. Accordingly, even in a transient mode of the engine where the engine speed sharply rises or falls, knocking determination can be carried out without impairing the capability of following the variation of the engine speed.
However, in the knocking determining device for an internal combustion engine disclosed in Japanese Patent Laying-Open No. 8-4580, the background level to be the standard for determining knocking is set based on an electric signal detected in the vibration of the internal combustion engine, which includes vibration due to knocking in addition to the mechanical vibration of the internal engine itself. As a result, the background level includes the effect of the magnitude of vibration due to knocking in addition to the magnitude of the mechanical vibration of the internal combustion engine itself. Thus, in the knocking determining device for an internal combustion engine disclosed in Japanese Patent Laying-Open No. 8-4580, the background level varies depending on whether there is knocking or not. In this case, even when there is knocking, knocking determination may not be carried out appropriately. Thus, there has been a problem that the ignition timing cannot properly be retarded when there is knocking or the ignition timing cannot properly be advanced when there is no knocking.